<div class="navigate">
	<div class="L"></div>
    <div class="C">
    	<a class="home" href="<?=$con_root_path?>" lang="<?=$array_lang[$lang_id][0]?>"><?=tdt('Trang_chu')?></a>
        <img src="<?=$theme_imagepath?>navigate_icon.gif" /><span><?=$nData?></span>
	</div>
    <div class="R"></div>
</div>
<?
if ($max > 0)
{
    //include 'inc_module_estore_information.php';
}
?>
<div class="module_top"><div class="fl"></div><div class="fr"></div></div>
<div class="padding module_larger_border">
	<?
	if ($max > 0)
	{
	?>
	<form class="form" action="<?=$con_root_path;?>update_cart.php?return=<?=$return;?>" method="post">
		<table class="product_table_list" cellpadding="0" cellspacing="0">
		<tbody>
			<tr class="title">
				<td width="1%"><?=tdt('STT');?></td>
				<td width="1%"><?=tdt('Picture');?></td>
				<td><?=tdt('Ten_san_pham');?></td>
				<td width="1%"><?=tdt('Xoa');?></td>
				<td width="18%"><?=tdt('Don_gia');?></td>
				<td width="10%"><?=tdt('So_luong');?></td>
				<td width="20%"><?=tdt('Tong');?></td>
			</tr>
			<?
			$sum = 0;
			for ($i=0;$i<$max;$i++)
			{
				//var_dump($_SESSION['cart']);die();
				$db_listing = new db_query('SELECT cat_id,cat_name,products_multi.* FROM categories_multi,products_multi WHERE pro_id=' . $_SESSION['cart'][$i]['pro_id'] . ' AND cat_id=pro_category_id LIMIT 1');
				$listing = mysql_fetch_array($db_listing->result);
				unset($db_listing);
				/*$db_pi = new db_query('SELECT pi_image FROM product_images WHERE pi_product_id=' . $_SESSION['cart'][$i]['pro_id'] . ' AND pi_primary=1 LIMIT 1');
				$pi = mysql_fetch_array($db_pi->result);
				unset($db_pi);*/
			?>
			<tr class="list">
				<td class="No"><?=$i+1;?></td>
				<td align="center">
					<div class="picture_small">
						<a class="tooltip" href="<?=generate_detail_url('product',$listing['cat_id'],$listing['pro_id'],$listing['pro_name']);?>" rel="nofollow"><img maxwidth="25" maxheight="25" height="16" src="/products_pictures/small_<?=$listing['pro_picture'];?>" width="25"></a>
					</div>
				</td>
				<td>
					<a class="text_link" href="<?=generate_detail_url('product',$listing['cat_id'],$listing['pro_id'],$listing['pro_name']);?>" rel="nofollow"><?=$listing['pro_name'];?></a>
				</td>
				<td><input type="checkbox" value="1" name="delete<?=$i;?>"></td>
				<td class="price" align="right"><?=format_number($listing['pro_price']);?> <?=tdt('VND');?></td>
				<td align="center">
					<input type="text" class="form_control" name="quantity<?=$i;?>" value="<?=$_SESSION['cart'][$i]['pro_quantity'];?>" style="text-align:right; width:50px">
				</td>
				<td class="price" align="right">
				<?
				$temp = $listing['pro_price'] * $_SESSION['cart'][$i]['pro_quantity'];
				$sum = $sum + $temp;
				echo format_number($temp);?> <?=tdt('VND');?></td>
			</tr>
			<?
			}
			?>
			<tr>
				<td align="center" colspan="5">
					<input type="button" class="form_button" value="<?=tdt('Thanh_toan');?>" onclick="window.location.href='<?=$con_root_path;?>payment.php?step=1'" />&nbsp;
					<input type="button" class="form_button" value="<?=tdt('Tiep_tuc_mua_hang');?>" onclick="window.location.href='<?=base64_decode($return);?>'" />&nbsp;
					<input type="submit" class="form_button" value="<?=tdt('Cap_nhat_gio_hang');?>" />&nbsp;
					<div class="payment_recount_notice">* <?=tdt('Khi_ban_doi_so_luong_hay_click_vao_nut_cap_nhat_gio_hang_hang_de_he_thong_cap_nhat_lai_gio_hang');?></div>
				</td>
				<td align="right"><span style="font-weight:bold"><?=tdt('Thanh_tien');?> :</span></td>
				<td align="right" class="price"><?=format_number($sum);?> <?=tdt('VND');?></td>
			</tr>
		</tbody>
		</table>
	</form>
	<?
	}
	else
	{
	?>
	<div class="data_is_updating" lang="<?=$array_lang[$lang_id][0];?>"><?=tdt('Chua_co_san_pham_nao_trong_gio_hang_cua_ban');?></div>
	<?
	}
	?>
</div>
<div class="module_bottom"><div class="fl"></div><div class="fr"></div></div>